package com.zkthink.ceres.store.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zkthink.base.R;
import com.zkthink.base.request.PageParams;
import com.zkthink.base.service.SuperService;
import com.zkthink.ceres.common.enums.StoreDailyStatisticEnum;
import com.zkthink.ceres.store.dto.*;
import com.zkthink.ceres.store.entity.AppletWithdraw;
import com.zkthink.ceres.store.entity.Store;
import com.zkthink.ceres.store.entity.StoreWithdrawHis;
import com.zkthink.ceres.store.vo.StoreShowVO;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 业务接口 店铺表
 * </p>
 *
 * @author kellen
 * @date 2020-05-14
 */
public interface StoreService extends SuperService<Store> {
  Store fidMid(Long mid);
  /**
   * 店铺分页展示
   * @param page
   * @return
   */
  IPage<Store>  IPageStore(@RequestBody PageParams<Store> page);

  /**
   * 查询商家默认店铺
   */
  Store getDefaultStore();

  Store findByTenantCode(String tenantCode);

  /**
   * 店铺埋点
   */
  @Async
  void addStorePoint(Long storeId, StoreDailyStatisticEnum statisticEnum);

  @Async
  void addStorePoint(List<Long> storeIds, StoreDailyStatisticEnum statisticEnum);

  /** 查询店铺列表
   * @author kellen 2020/6/4 15:34
   * @return
   */
  IPage<Store> findStoreListForPlatform(PageParams<StorePageDTO> params);

  String findTenantCodeByStoreId(Long storeId);

  /**
   * 添加核销人员
   * @return
   */
  R addverify(AddverifyDto dto);
  R appletWithdraw(AppletWithdraw appletWithdraw);

  R<IPage<AppletWithdraw>> findWithdrawHis(IPage page, AppletWithdraw model);


  /**
   * 删除核销人员
   * @param mid
   * @return
   */
  R deleteVerify(Long mid);

  /**
   * 查找核销人员
   * @return
   */
  R verify(Long storeId);

  /**
   * 店铺展示
   * @param dto
   * @return
   */
  List<StoreShowVO>  allStore(AllStoreDTO dto);

  /**
   * 店铺展示 评分排序
   * @param dto
   * @return
   */
  List<StoreShowVO> allStoreScore(AllStoreDTO dto);

  /**
   * 华为店铺展示 评分排序
   * @param dto
   * @return
   */
  List<StoreShowVO> allStoreScoreHuaWei(AllStoreDTO dto);

  /**
   * 我的店铺  店长 核销人员
   * @return
   */
  R myScore(Long userid);

  /**
   * 店铺添加服务
   * @param storeProject
   * @return
   */
    R addstoreProject(Map<String,Object> storeProject);

  /**
   * 假删除
   * @param id
   * @return
   */
  R delectstoreProject(Long id);

  /**
   * 店铺服务
   * @return
   */
  R storeProject(Long storeid);

  /**
   * 获取所以的市
   * @return
   */
  List<String> getcity();

  /**
   * 店铺详情
   * @param id
   * @return
   */
  StoreShowVO xianqing(Long id);

  /**
   * 服务详情
   * @param id
   * @return
   */
  StoreProjectXianqing projectXianqing(Long id);

  /**
   * 编辑店铺
   * @param dto
   * @return
   */
    R updateStore(StoreUpdateDTO dto);

  /**
   * 判断店铺是否存在
   * @param id
   * @return
   */
  R selectstoreid(Long id);
  

  
}
